<!doctype html>
<html>

<head>
  <meta charset="utf-8">
  <title>第一个测试页面</title>
</head>

<body>
  <script>
    document.write("hello world")
    alert("hello world2")
    console.log("hello world1")
    var a = 10;
    console.log(a.toString())
    console.log(typeof(a.toString()))
    var b = "20"
    console.log(a+b)
    var a = prompt("请输入数字")
    b = parseInt(a)
    console.log(b)
    console.log(0 ? 2 : 3)
    var arr = ["a","b","c","d"]
    for(var i in arr){
      console.log("第"+i+"个元素是："+arr[i])
    }
    function func(num1,num2){
      return num2+num1
    }
    console.log(func(1,2))
var f = func
console.log(f(2,2))

      var arr1 = new Array(10,20,30)
for(var i = 0;i <3;i++){
  console.log("arr1:"+arr1[i])
}
var arr3 = new Array("a","b",111)
    console.log("arr3: "+arr3)

var arr2 = []
    console.log("arr2 :"+arr2)
for(var i =0;i<4;i++){
  arr2[i] = i+100
  }
  console.log("arr2  :"+arr2)
  var d1 = Date()
console.log(d1)
 </script>

  <script>

console.log(window.document)
console.log(window.frames)
console.log(window.navigator)
console.log(window.screen)
console.log(window.history)
console.log(window.location)
  </script>


</body>

</html>
